// 群相关store

import { defineStore } from 'pinia';
import { GroupMemberInfo } from '@/utils/type';

export const useGroupStore = defineStore('group', {
    state: () => {
        return {
            groupMembers: null as GroupMemberInfo[] | null, // 群成员
        }
    },
    actions: {
        // 设置群成员列表
        setGroupMembers(groupMembers: GroupMemberInfo[]) {
            this.groupMembers = groupMembers;
        },

    },
    getters: {
    },
    // 配置持久化
    persist: {
        paths: ['groupMembers'],
    },
});